﻿<UserControl
    x:Class="TimelineSL.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:timeline="clr-namespace:TimelineLibrary;assembly=TimelineLibrary"
    mc:Ignorable="d"
    TextOptions.TextHintingMode="Animated"
    d:DesignHeight="300"
    d:DesignWidth="400"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls">

    <Grid
        x:Name="LayoutRoot"
        Background="White">
        <controls:TabControl>
            <controls:TabItem
                x:Name="tiTimeLine"
                Header="TimeLine">
                <Grid
                    x:Name="grdTimeLine">
                    <Grid.RowDefinitions>
                        <RowDefinition
                            Height="*" />
                        <RowDefinition
                            Height="30" />
                    </Grid.RowDefinitions>

                    <timeline:TimelineTray
                        x:Name="timeline"
                        Grid.Row="0"
                        DescriptionWidth="226"
                        CalendarType="gregorian"
                        HorizontalAlignment="Stretch"
                        MinDateTime="01/01/1830"
                        MaxDateTime="01/01/1930"
                        CurrentDateTime="11/01/1855">

                        <Grid.RowDefinitions>
                            <RowDefinition
                                Height="Auto" />
                            <RowDefinition
                                Height="*" />
                            <RowDefinition
                                Height="50" />
                        </Grid.RowDefinitions>

                        <timeline:TimelineTray.Urls>
                            <timeline:UriInfo
                                Url="http://localhost:4444/Monet.xml" />
                        </timeline:TimelineTray.Urls>

                        <timeline:TimelineToolbox
                            Grid.Row="0"
                            ></timeline:TimelineToolbox>
                        
                        <timeline:TimelineBand
                            Grid.Row="1"
                            IsMainBand="True"
                            ItemSourceType="years"
                            HorizontalAlignment="Stretch"
                            TimelineWindowSize="20"
                            MaxEventHeight="130" />

                        <timeline:TimelineBand
                            Grid.Row="2"
                            HorizontalAlignment="Stretch"
                            ItemSourceType="decades"
                            TimelineWindowSize="16"
                            MaxEventHeight="4" />

                    </timeline:TimelineTray>

                    <Button
                        Grid.Row="1"
                        Height="20"
                        Width="80"
                        HorizontalAlignment="Left"
                        Content="ResetEvents"
                        Click="OnResetEventsClick" />
                    <Button
                        Grid.Row="1"
                        Height="20"
                        Width="80"
                        Content="Clear Events"
                        Click="OnClearEventsClick" />
                    <TextBox
                        Height="23"
                        HorizontalAlignment="Left"
                        Margin="142,-31,0,0"
                        Name="textBox1"
                        Text="{Binding CurrentDateTime, ElementName=timeline, Mode=TwoWay}"
                        VerticalAlignment="Top"
                        Width="120" />
                </Grid>
            </controls:TabItem>
            <controls:TabItem
                x:Name="tiOther"
                Header="Another">
                <Grid />
            </controls:TabItem>
        </controls:TabControl>
    </Grid>
</UserControl>
